<?php
session_start();
?>
<head>
<script type="text/javascript" language="javascript" src="parts/subcomisiones/js/function_js.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" language="javascript" src="parts/subcomisiones/js/ajax_consulta.js"></script>
</head>
<?php

include_once '../../lib/config_inc.php';
include_once '../../class/function.php';
		$nombre=$_SESSION["nombre"];
		$apellido=$_SESSION['apellido'];
		$id_cuenta=$_SESSION["id_cuentausuario"];
		$nombre_recibe=$nombre." ".$apellido;	
		$variable = $_GET['v'];
		$id_subcomision = $_GET['id'];
		$id_area = $_GET['id_s'];
		$nombre_subcomision= $_GET['subcomi'];	
			
?>

<script type="text/javascript">

SexyLightbox.refresh();

</script>


<form id="formulario" name="formulario" action="" onsubmit="return false">
<table  class="centrado borde" <?=$conf_tablas?> border="2">
    <tr>
        <td colspan="2" class="titulo">

            <div style="width:65%;padding:4px;float:left;">
                <span style="color:#ffffff">.::</span>
                Areas de <?php echo $nombre_subcomision;?> <a href="demo-data.php?modal=1&v=8&height=200&width=400"  rel="sexylightbox"><img title="Informacion" src="images/iconos/help.ico"/></a>
            </div>

	   <div style="width:15%;padding:4px;float:left; font-size:12;">
	   	
		<a href="javascript:updateView('parts/subcomisiones/subcomisiones.php')">
		<img src="images/iconos/regresar.png" alt="Icono" title="Atrás"></a> Atrás
	
          </div>

            <div style="width:15%;padding:4px;float:left; font-size:12;">

		<a href="index.php">
		<img src="images/iconos/home-icon.png" alt="Icono" title="Inicio"></a> Inicio

            </div>
        </td>
    </tr>
  
    <?php /*******************Comienza area de subcomisión *******************************************************/

	if($variable==2){ 
			
			$status=true;
			$array=consultar_area($id_area, $status); ?>
			
		
  <tr> 
                    <td class="sombra1" colspan="1" width="33%">Nombre del Area</td>
                    <td class="sombra2" colspan="1">
                        <input type="text" name="nombre_area" id="nombre_area" maxlength="50" size="20" value="<?php echo $array[0]['nb_area'];?>">
                    </td>
       </tr>
<tr> 
                    <td class="sombra1" colspan="1" width="33%">Descripción del Area</td>
                    <td class="sombra2" colspan="1">
                        <input type="text" name="descripcion_area" id="descripcion_area" maxlength="50" size="20" value="<?php echo $array[0]['descripcion_area'];?>">
                    </td>
</tr>
	<tr>
        	<td class="sombra3" colspan="2">
			<input type="hidden" name="accion"  id="accion"  value="<?php echo $variable?>">
			<input type="hidden" name="id_area" id="id_area" value="<?php echo $array[0]['id_area'];?>"> 
			<input type="hidden" name="id_subcomision" id="id_subcomision" value="<?php echo $array[0]['id_subcomision'];?>"> 
 			<a href="javascript:void(0)" onclick="valida_area()" class="nav">
			<img class="imagen-td" src=images/boton_actualizar.jpg title="Modificar"></a>
		</td>
	</tr>

	
		
		
	<?php  }  /******************************************Finaliza Modificar Area ****************************************************************************/ 
	
	
	/****************************************************************Comienza Insertar Areas *******************************************************/

	if($variable==1){ ?>
 <tr> 
                    <td class="sombra1" colspan="1" width="33%">Nombre del Area</td>
                    <td class="sombra2" colspan="1">
                        <input type="text" name="nombre_area" id="nombre_area" maxlength="50" size="20">
                    </td>
       </tr>
<tr> 
                    <td class="sombra1" colspan="1" width="33%">Descripción del Area</td>
                    <td class="sombra2" colspan="1">
                        <input type="text" name="descripcion_area" id="descripcion_area" maxlength="50" size="20">
                    </td>
</tr>
	<tr>
        	<td class="sombra3" colspan="2">
			<input type="hidden" name="accion"  id="accion"  value="<?php echo $variable?>">
			<input type="hidden" name="id_subcomision" id="id_subcomision" value="<?php echo $id_subcomision?>"> 
 			<a href="javascript:void(0)" onclick="valida_area()" class="nav">
			<img class="imagen-td" src=images/boton_insertar.jpg title="Insertar"></a>
		</td>
	</tr>

	
		
		
	<?php  }  ?>
				
</table>
</form>